import { createApp } from 'vue'
import App from './App.vue'

const app = createApp(App)

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// @ts-expect-error忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// svg插件需要配置代码
import 'virtual:svg-icons-register'
// 引入全局样式
import '@/styles/index.scss'
// 引入路由
import router from './router'
// 全局自定义组件
import globalComponents from '@/components/index.ts'
// 引入仓库
import pinia from './store'
// 引入路由鉴权文件
import '@/router/permission.ts'
app.use(pinia)
app.use(globalComponents)
app.use(router)
app.use(ElementPlus, {
  locale: zhCn,
})

app.mount('#app')
